import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule} from '@angular/router';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {HttpLoaderFactory} from '../../app.module';
import {HttpClient} from '@angular/common/http';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {FormsModule} from '@angular/forms';
import {ExamCenterComponent} from './exam-center.component';
import {ExamListComponent} from './exam-list/exam-list.component';
@NgModule({
  imports: [
    CommonModule,
    TranslateModule.forChild({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpClient]
      }
    }),
    RouterModule.forChild([{
      path: '', component: ExamCenterComponent,
      children: [
        {path: '', redirectTo: 'examlist', pathMatch: 'full'},
        {path: 'examlist', component: ExamListComponent},
        {path: '**', redirectTo: 'examlist'}
      ]
    }]),
    NgZorroAntdModule,
    FormsModule
  ],
  declarations: [
    ExamCenterComponent,
    ExamListComponent
  ]
})
export class ExamCenterModule {
}
